<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateFrontendUsersTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('frontend_users', function (Blueprint $table) {
            $table->id();
            $table->timestamps();
            $table->string('mobile', 16)->unique()->comment('手机号');
            $table->string('nickname', 64)->nullable()->comment('用户昵称');
            $table->string('avatar_url', 256)->nullable()->comment('用户头像地址');
            $table->string('real_name', 64)->nullable()->comment('真实姓名');
            $table->string('password', 64)->comment('登录密码');
            $table->string('wallet_address', 64)->comment('钱包地址');
            $table->dateTime('last_login_time')->nullable()->comment('上次登录时间');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('frontend_users');
    }
}
